<?php
/**
* 用户注册页面
* $Id: reg.php 136 2010-04-30 23:05:28Z bwanglei $
*/

include_once(dirname('__FILE__').'/init.php');

if ($_SERVER['REQUEST_METHOD']=='POST') {
	$username_reg = $_POST['username_reg'];
	$nickname_reg = $_POST['nickname_reg'];
	$password_reg = md5($_POST['password_reg']);
	$email_reg = $_POST['email_reg'];
	$query_reg = "insert into `".DB_PREFIX."user` values ('".$username_reg."', '".$nickname_reg."', '".$email_reg."', ".time().", '', '".$password_reg."')";
	$mysql_conn->query($query_reg);
	apf_redirect(0,$apf_settings['base_url'].'message.php?m=注册成功，您可以使用注册信息进行登录');
} else {
	include_once(BASE_PATH.TEMP_DIR.'/reg.php');
}
?>
